/*
 * @Author: xiehangyun 
 * @Date: 2025-05-16 18:16:33 
 * @Last Modified by:   xiehangyun 
 * @Last Modified time: 2025-05-16 18:16:33 
 */
import Api from "src/api/Api";

//接口
class IndexApi extends Api {

    constructor() {
        super();
    }

    //添加
    add() {
        return this._post("", {});
    }
    //修改
    update(data: any) {
        return this._post("", { data });
    }
    //删除
    delete(id: string) {
        return this._post(`/?id=${id}`);
    }
    //查询零件
    get(pageNum: number, pageSize: number) {
        return this._post("/", { pageNum, pageSize });
    }
    //获取单个零件的信息
    get_by_id(id: string) {
        return this._post(`/?id=${id}`);
    }

}
const indexApi = new IndexApi();
export default indexApi;